package com.adcc.ags.gms.mq.entity;

/**
 * @author zhangpeng
 */
public class MQServer {

	private String hostname = "";
	private String username = "";
	private String password = "";

	public MQServer(String hostName, String userName, String password) {
		this.hostname = hostName;
		this.username = userName;
		this.password = password;
	}

	@Override
	public boolean equals(Object otherObject) {
		if (otherObject instanceof MQServer) {
			MQServer otherMqServer = (MQServer)otherObject;
			if (this.hostname.equals(otherMqServer.hostname)
					&& this.username.equals(otherMqServer.username)
					&& this.password.equals(otherMqServer.password))
				return true;
			else
				return false;
		} else
			return false;
	}

	/**
	 * @return the hostname
	 */
	public String getHostname() {
		return hostname;
	}

	/**
	 * @param hostname
	 *            the hostname to set
	 */
	public void setHostname(String hostname) {
		this.hostname = hostname;
	}

	/**
	 * @return the username
	 */
	public String getUsername() {
		return username;
	}

	/**
	 * @param username
	 *            the username to set
	 */
	public void setUsername(String username) {
		this.username = username;
	}

	/**
	 * @return the password
	 */
	public String getPassword() {
		return password;
	}

	/**
	 * @param password
	 *            the password to set
	 */
	public void setPassword(String password) {
		this.password = password;
	}

	@Override
	public String toString() {
		return "MQServer{" +
				"hostname='" + hostname + '\'' +
				", username='" + username + '\'' +
				", password='" + password + '\'' +
				'}';
	}
}
